//
//  NetWorkRequestApi.h
//  BaoGongBao
//
//  Created by User on 14/11/16.
//  Copyright (c) 2014年 irule. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

/*
 *"AUFNR": "",//订单
 "VORNR": "",工序
 "F1": "",
 "F2": "",
 "F3": "",
 *
 */

#define kURLmain						@"http://220.178.74.185:17777/"		// test

#define UPPORT @"16667"

#define kURLimage

#define kURL_GetVersion					@"GetVersion"
#define kURL_CheckApiStatus				@"CheckApiStatus"
#define kURL_Login						@"Login"
#define kURL_Register					@"Register"
#define kURL_GetMesUserInfo				@"GetMesUserInfo"
#define kURL_GetPartInfo				@"GetPartInfo"
#define kURL_SearchPartWork				@"SearchPartWork"
#define kURL_SearchForkmanWork			@"SearchForkmanWork"

/*****************************************************************/
#define kNRStr_NetworkStatusDefault					@"未知错误"
#define kNRStr_NetworkStatusUnknown					@"未知网络"
#define kNRStr_NetworkStatusNotReachable			@"网络连接失败，请重试"
#define kNRStr_NetworkStatusReachableViaWWAN		@"3G网络"
#define kNRStr_NetworkStatusReachableViaWiFi		@"Wifi网络"


#define kNRStr_DataIsNull							@"没有数据"
#define kNRStr_LoadingData							@"正在获取数据..."
#define kNRStr_LoadDataFailure						@"获取数据失败，请重试"
#define kNRStr_register_mobileisnull				@"请输入手机号码"

/*****************************************************************/
@interface NetWorkRequestApi : NSObject


+ (NetWorkRequestApi *)sharedNetWorkRequestApi;


#pragma mark - GetVersion
//http://220.178.74.185:17777/api/App/GetVersion?appId=HMP_002&platform=3
- (void)nrGetVersion:(NSDictionary *)parameters
			 success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
			 failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
#pragma mark - CheckApiStatus
//http://220.178.74.185:17777/api/CheckApiStatus?appId=HMP_002
- (void)nrCheckApiStatus:(NSDictionary *)parameters
				 success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
				 failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark - Login
//http://220.178.74.185:17777/api/Login appid:HMP_002   deviceid:860955020541003   userName:
- (void)nrLogin:(NSDictionary *)parameters
		success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
		failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark - Register
//http://220.178.74.185:17777/api/Register
//-->param:{PlatForm=3, mobilenum=15256995851, appid=HMP_001, DeviceName=MI 2S, OSName=android 4.1.1, loginplace=中国,安徽省,合肥市,蜀山区,创业大道,117.201456,31.861073, deviceid=860955020541003}
- (void)nrRegister:(NSDictionary *)parameters
		   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
		   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark - RegisterNext
//http://220.178.74.185:17777/api/Register
//-->param:{PlatForm=3, mobilenum=15256995851, appid=HMP_001, DeviceName=MI 2S, OSName=android 4.1.1, loginplace=中国,安徽省,合肥市,蜀山区,创业大道,117.201456,31.861073, deviceid=860955020541003}
- (void)RegisterNext:(NSDictionary *)parameters
			 success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
			 failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark 个人信息
//http://220.178.74.185:17777/hmp_002/api/GetMesUserInfo?UserName=zhangzenghui&token=ee820e2f8bc444088d696401ff65b3f9
- (void)nrGetMesUserInfo:(NSDictionary *)parameters
				 success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
				 failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark 零部件报工 完工报工
//http://220.178.74.185:17777/hmp_002/api/GetPartInfo?AUFNR=44555&VORNR=0010&Token=4a94059b759e4d9fa0bc62e4bb764cb0
- (void)SparePartsWangGongBaoGongSearch:(NSDictionary *)parameters
								success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
								failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
#pragma mark SearchPartWork
//url:http://220.178.74.185:17777/hmp_002/api/SearchPartWork?Token=deb7709020ae422b9bebeab54d822cb2   searchParas:{"ISSUCCESS":"E","EDATE":"","AUFNR":"","BDATE":""}
- (void)SearchPartWork:(NSDictionary *)parameters
				  success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
				  failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
#pragma mark SearchForkmanWork
- (void)SearchForkmanWork:(NSDictionary *)parameters
				  success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
				  failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark GetPartInfo
//ht tp://220.178.74.185:17777/hmp_002/api/GetPartInfo?AUFNR=007200038879&VORNR=0010&Token=4a271207b3fd4b6db46251d502da99b9
- (void)GetPartInfo:(NSDictionary *)parameters
			success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
			failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark SavePartWork
//url:ht tp://220.178.74.185:17777/hmp_002/api/SavePartWork?Token=  center:0010  bg:10
// us:zhangzenghui maH97Y5-22001  token:828c870b2f4d4fe5ad1dbe301d8683bf
- (void)SavePartWork:(NSDictionary *)parameters
			 success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
			 failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark GetForkmanInfo
//ht tp://220.178.74.185:17777/hmp_002/api/GetForkmanInfo?AUFNR=007200038879&VORNR=0010&Token=915a611f12794ba1973243d643b46dd1
- (void)GetForkmanInfo:(NSDictionary *)parameters
			   success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
			   failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

#pragma mark SyncPartWork
- (void)SyncPartWork:(NSDictionary *)parameters
			 success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
			 failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
#pragma mark SyncForkmanWork
//ht tp://220.178.74.185:17777/hmp_002/api/SyncForkmanWork?Token=a33701fc9fc345ef9eea6a835ef24d74
- (void)SyncForkmanWork:(NSDictionary *)parameters
				success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
				failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;


#pragma mark - 检测网络连接
- (void)reach;
//#pragma mark - Session 下载
//- (void)sessionDownload;
//#pragma mark - POST JSON
//- (void)postJSON;
//#pragma mark - 随机文件名上传
//- (void)postUpload1;
//#pragma mark - POST上传
//- (void)postUpload;
//#pragma mark - JSON
//- (void)XMLData;
//#pragma mark - JSON
//- (void)JSONData;
//#pragma mark - POST登录
//- (void)postLogin;
//#pragma mark - GET登录
//- (void)getLogin;

@end
